package com.bigfire.dtm.api.dto.req.user;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.Email;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

/***
 * @author Damon S.
 */
@Data
@ApiModel(value = "新建用户请求参数")
public final class CreateUserReqDTO implements Serializable {
    private static final long serialVersionUID = 22480613254L;


    @ApiModelProperty(value = "应用名", required = true)
    @NotNull(message = "用户名不能为空")
    @Length(max = 30, message = "用户名不得超过30个字符")
    private String username;


    @ApiModelProperty(value = "密码", required = true)
    @NotNull(message = "用户名称不能为空")
    @Length(max = 30, message = "密码不得超过30个字符")
    private String password;


    @ApiModelProperty(value = "电子邮箱", required = true)
    @NotNull(message = "电子邮箱不能为空")
    @Email
    private String email;
}
